home *** CD-ROM | disk | FTP | other *** search
/ PC Basics 53 / PC Basics Issue 53.iso / Software / Internet / Invboard.exe / PC Basics 53 / Invboard / upload / Skin / s1 / skin_poll.php < prev    next >
Encoding:
PHP Script  |  2002-06-12  |  2.6 KB  |  77 lines

  1. <?php
  2.  
  3. class skin_poll {
  4.  
  5.  
  6.  
  7. function edit_link($tid, $fid) {
  8. global $ibforums;
  9. return <<<EOF
  10. [ <a href="{$ibforums->base_url}&act=Mod&CODE=20&f=$fid&t=$tid">{$ibforums->lang['ba_edit']}</a> ]
  11. EOF;
  12. }
  13.  
  14. function delete_link($tid, $fid) {
  15. global $ibforums;
  16. return <<<EOF
  17. [ <a href="{$ibforums->base_url}&act=Mod&CODE=22&f=$fid&t=$tid">{$ibforums->lang['ba_delete']}</a> ]
  18. EOF;
  19. }
  20.  
  21. function Render_row_form($votes, $id, $answer) {
  22. global $ibforums;
  23. return <<<EOF
  24.     <tr>
  25.     <td id='row1' colspan='3'><INPUT type="radio" name="poll_vote" value="$id"> <b>$answer</b></td>
  26.     </tr>
  27. EOF;
  28. }
  29.  
  30. function ShowPoll_header($tid, $edit, $delete) {
  31. global $ibforums;
  32. return <<<EOF
  33.     <form action="{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}" method="post">
  34.     <input type='hidden' name='act' value='Poll'>
  35.     <input type='hidden' name='s' value='{$ibforums->session_id}'>
  36.     <input type='hidden' name='t'    value='$tid'>
  37.     <br>
  38.     <table cellpadding='0' cellspacing='0' border='0' width='{$ibforums->skin['tbl_width']}' bgcolor='{$ibforums->skin['tbl_border']}' align='center'>
  39.         <tr>
  40.             <td>
  41.                 <table cellpadding='5' cellspacing='1' border='0' width='100%'>
  42.                 <tr>
  43.                 <td align='right' colspan='3' id='titlemedium'>$edit   $delete</td>
  44.                 </tr>
  45.                 <tr>
  46.                 <td id='row1' valign='middle' align='left' width='50%'><b>{$ibforums->lang['poll_s_choices']}</b></td>
  47.                 <td id='row1' valign='middle' align='left' width='10%'><b>{$ibforums->lang['poll_s_votes']}</b></td>
  48.                 <td id='row1' valign='middle' align='left' width='40%'><b>{$ibforums->lang['poll_s_stats']}</b></td>
  49. EOF;
  50. }
  51.  
  52. function ShowPoll_footer($vote_button) {
  53. global $ibforums;
  54. return <<<EOF
  55.                 <tr>
  56.                 <td id='row2' align='center' colspan='3'>
  57.                 $vote_button
  58.                 </td></tr></table>
  59.                 </td></tr></table>
  60.                 </form>
  61. EOF;
  62. }
  63.  
  64. function Render_row_results($votes, $id, $answer, $percentage, $width) {
  65. global $ibforums;
  66. return <<<EOF
  67.     <tr>
  68.     <td id='row1'><b>$answer</b></td>
  69.     <td id='row1'><b>$votes</b></td>
  70.     <td id='row1'><img src='{$ibforums->vars['img_url']}/bar_left.gif' border='0' width='4' height='11' align='middle' alt=''><img src='{$ibforums->vars['img_url']}/bar.gif' border='0' width='$width' height='11' align='middle' alt=''><img src='{$ibforums->vars['img_url']}/bar_right.gif' border='0' width='4' height='11' align='middle' alt=''> [$percentage%]</td>
  71.     </tr>
  72. EOF;
  73. }
  74.  
  75.  
  76. }
  77. ?>